home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
001a
/
hostpag2.zip
/
HOSTPAGE.SCR
< prev
Wrap
Text File
|
1991-12-05
|
4KB
|
98 lines
;HOSTPAGE.SCR...Written by Steve Wilson on 12-5-91
;
; Special thanks to Rick Dexter for ideas from his "PAGER.SCR".
;
; " " " John Friel " " " " "RING.SCR".
;
Graphics ANSI ;this is standard Qmodem setup.
TurnON 8_BIT
TurnOFF LINEFEED
TurnOFF XON/XOFF
TurnON NOISE
TurnOFF MUSIC
TurnON SCROLL
TurnOFF PRINT
TurnOFF ECHO
TurnOFF SPLIT
TurnON BS_DEL
; --- these are strings for counters within the program
STRING RINGNUM, CYCLES, PAGES, TOTALRINGS
ASSIGN CYCLES 0 ;number of waitfor timeouts, used for debugging
ASSIGN PAGES 0 ;number of times program dialed pager
ASSIGN TOTALRINGS 0 ;total number of rings of the phone
; --- you might want to fool around with these init strings:
Reset:
SEND "ATZ^M" ;reset modem
WAITFOR "OK"
SEND "ATE1L3S0=0S8=1S10=50S11=0X4^M" ;initialize modem
WAITFOR "OK"
;procedure Start --- clear counters and screen, display sign on
Start:
TimeOut 30 Start ;set waitfor timeout to 30 seconds and execute
;procedure "start" upon timeout
ASSIGN RINGNUM 0 ;upon timeout, clear ring count to 0
CLRSCR
NOTE "AUTOMATIC PAGER/HOST SCRIPT ACTIVATED..."
NOTE "Waiting for calls..."
NOTE " $CYCLES cycles, $TOTALRINGS rings, $PAGES pages"
INCR CYCLES ;keep track of number of cycles for debugging
WAITFOR "RING" ;wait for "RING" or timeout, either execute
;procedure CountRings or timeout to Start procedure
GOTO CountRings
;procedure CountRings --- increment number of rings and check for pick up value
CountRings:
INCR RINGNUM ;current cycle - number of rings
INCR TOTALRINGS ;total rings since program started
NOTE " $RINGNUM Ringy-Dingy...Is This A Host Call?"
TimeOut 6 Oneswitch ;set timeout for 6 secs, then ready host.
WAITFOR "RING"
TimeOut 6 Start
INCR RINGNUM
INCR TOTALRINGS
NOTE " $RINGNUM Ringy-Dingies...Nope, Guess Not!!"
WAITFOR "RING"
TimeOut 7 Start
INCR RINGNUM
INCR TOTALRINGS
NOTE " $RINGNUM Ringy-Dingies...Wake Up Answering Machine!!"
WAITFOR "RING"
TimeOut 7 Start
INCR RINGNUM
INCR TOTALRINGS
NOTE " $RINGNUM Ringy-Dingies...I'm Gonna BEEP You!!"
IF $RINGNUM = "4" DialPager ;Call the pager 80 seconds after the 4th ring.
GOTO Reset
;procedure Oneswitch --- Starts host if called again within 15 seconds.
Oneswitch:
NOTE "Guess So...I'll Start The Host On The Next Ring..."
TimeOut 15 Start
WAITFOR "RING"
HOST SINGLE
SEND "ATM1H0"
WAITFOR "OK"
GOTO Reset
;procedure DialPager --- Waits about 80 seconds and dials pager number
DialPager:
Timeout 30 Start
NOTE
NOTE "Waiting For Caller To Leave Message..."
PAUSE 170000 ;These pauses total about eighty seconds...
PAUSE 170000 ;If your modem supports the X4 hayes command, this is perfect.
NOTE "Now Calling The Electronic Leash..."
;---Put your pager and home number here. I've found that digital display pagers
;---need about 8 seconds delay between calling and entering the display number.
;---S8=1 will set the comma to a one second pause.(two seconds is the default)
SEND "ATDT*70,1-800-555-5555,,,,,,,,555-5555,#^M"
;-----------(*70, turns off call waiting...If you don't have it, don't use it!)
;---My modem returns a "BUSY" when the page is complete, (it supports X4)
;---also, if someone is very long winded leaving their message, the modem
;---will return "NO DIALTONE". This will cause it to wait and try again.
;---If your modem doesn't support X4, it won't react to "BUSY" or "NO DIALTONE"
;---so you may need to replace this WAITFOR with a PAUSE 150000 (about 25 secs)
;---and remove the WHEN line.
WAITFOR "BUSY"
WHEN "NO DIALTONE" Dialpager
HANGUP
INCR PAGES ;total pages since program started
GOTO Reset ;loop back to beginning